Methods and Systems to Determine Baseline Event-Type Distributions of Event Sources and Detect Changes in Behavior of Event Sources

ABSTRACT

Automated methods and systems to determine a baseline event-type distribution of an event source and use the baseline event type distribution to detect changes in the behavior of the event source are described. In one implementation, blocks of event messages generated by the event source are collected and an event-type distribution is computed for each of block of event messages. Candidate baseline event-type distributions are determined from the event-type distributions. The candidate baseline event-type distribution has the largest entropy of the event-type distributions. A normal discrepancy radius of the event-type distributions is computed from the baseline event-type distribution and the event-type distributions. A block of run-time event messages generated by the event source is collected. A run-time event-type distribution is computed from the block of run-time event messages. When the run-time event-type distribution is outside the normal discrepancy radius, an alert is generated indicating abnormal behavior of the event source.

CROSS-REFERENCE TO RELATED APPLICATION

This application is a continuation of application Ser. No. 15/828,227,filed Nov. 30, 2017.

TECHNICAL FIELD

This disclosure is directed to automated computational systems andmethods to compute baseline event-type distributions for event sourcesand use the baseline event-type distributions to detect and reportchanges in behavior of event sources.

BACKGROUND

Electronic computing has evolved from primitive, vacuum-tube-basedcomputer systems, initially developed during the 1940s, to modernelectronic computing systems in which large numbers of multi-processorcomputer systems, such as server computers, work stations, and otherindividual computing systems are networked together with large-capacitydata-storage devices and other electronic devices to producegeographically distributed computing systems with hundreds of thousands,millions, or more components that provide enormous computationalbandwidths and data-storage capacities. These large, distributedcomputing systems are made possible by advances in computer networking,distributed operating systems and applications, data-storage appliances,computer hardware, and software technologies.

In modern computing systems, individual computers, subsystems, andcomponents generally output large volumes of status, informational, anderror messages that are collectively referred to, in the currentdocument, as “event messages.” In large, distributed computing systems,terabytes of event messages may be generated each day. The eventmessages are sent to a log management server that records the eventmessages in event logs that are in turn stored as files in data-storageappliances. Log management servers are typically used to determine thetypes of events recorded in the event messages, but log managementservers currently lack the ability to detect anomalous behavior of anevent source from the many thousands, if not millions, of event messagesgenerated by the event source. System administrators seek methods andsystems that automatically detect anomalous states of event sourcesbased on the event messages generated by the event sources.

SUMMARY

This disclosure describes automated computational methods and systems todetermine a baseline event-type distribution of an event source and usethe baseline event type distribution to detect changes in the behaviorof the event source. In one implementation, blocks of event messagesgenerated by the event source are collected and an event-typedistribution is computed for each of block of event messages. Candidatebaseline event-type distribution of the event-type distributions areidentified. The baseline event-type distribution has the largest entropyof the candidate baseline event-type distributions. A normal discrepancyradius of the event-type distributions is computed from the baselineevent-type distribution and the event-type distributions. A block ofrun-time event messages generated by the event source is collected. Arun-time event-type distribution is computed from the block of run-timeevent messages. When the run-time event-type distribution is outside thenormal discrepancy radius, an alert is generated indicating abnormalbehavior of the event source.

DESCRIPTION OF THE DRAWINGS

FIG. 1 shows an example of logging event messages in event logs.

FIG. 2 shows an example of a source code with log write instructions.

FIG. 3 shows an example of a source code and event messages generatedfrom log write instructions.

FIG. 4 shows an example of a log write instruction.

FIG. 5 shows an example of an event message generated by a log writeinstruction.

FIG. 6 shows an eight-entry portion of an event log.

FIG. 7 shows an example of event-type analysis performed on the eventmessage shown in FIG. 5.

FIG. 8 shows an example of random sampling of event messages generatedby an event source.

FIG. 9 shows a method of determining an event-type distribution fromevent messages.

FIG. 10A shows a table of similarities computed for pairs of event-typedistributions.

FIG. 10B shows an example plot of similarities.

FIG. 11 shows an example of determining an event-type distribution fromrun-time event messages.

FIG. 12 shows examples of event-type distributions computed fromcontinuous blocks of event messages.

FIG. 13A shows an example plot of event-type distributions as M-tuplesin an M-dimensional space.

FIG. 13B shows local outlier factors computed for event-typedistributions in FIG. 13A.

FIG. 14 shows a matrix of distances computed between pairs of event-typedistribution.

FIG. 15 shows an example of three clusters of event-type distributionclusters for an event source that operates in three different normalstates.

FIG. 16A shows a plot of an example run-time event-type distribution anda baseline event-type distribution for twenty event types.

FIG. 16B shows a plot of rank ordered absolute values of event-typemismatches computed between relative frequencies of the run-time andbaseline event types of FIG. 16A.

FIG. 16C shows a plot of event-type mismatches rank ordered from largestpositive value to largest negative value of the run-time and baselineevent types of FIG. 16A.

FIG. 17 shows control-flow diagram of a method to determine a baselineevent-type distribution and detect abnormal behavior of an event source.

FIG. 18 shows a control-flow diagram of the routine “determine baselineevent-type distribution” called in FIG. 17.

FIG. 19 shows a control-flow diagram of the routine “determine normaldiscrepancy radius” called in FIG. 17.

FIG. 20 shows a control-flow diagram of a method to determine a baselineevent-type distribution and detect abnormal behavior of an event source.

FIG. 21 shows a control-flow diagram of the routine “determine baselineeven-type distribution” called in FIG. 20.

FIG. 22 shows a control-flow diagram of the routine “determine baselineeven-type distribution” called in FIG. 20.

FIG. 23 shows a control-flow diagram of the routine “determine normaldiscrepancy radius” called in FIG. 20.

FIG. 24 shows a control-flow diagram of the routine “determine whichcluster run-time event-type distribution belongs to” called in FIG. 20.

DETAILED DESCRIPTION

This disclosure presents automated computational methods and systems todetermine a baseline event-type distribution of event messages anddetect abnormal behavior of an event source based on the baselineevent-type distribution. In a first subsection, logging event messagesin event logs is described in a first subsection are described. Methodsto determine baseline event-type distributions and detect abnormalbehavior of event sources are described in a second subsection.

Logging Event Messages in Event Logs and Determining Event Types

FIG. 1 shows an example of logging event messages in event logs. In FIG.1, a number of computer systems 102-106 within a distributed computingsystem are linked together by an electronic communications medium 108and additionally linked through a communications bridge/router 110 to anadministration computer system 112 that includes an administrativeconsole 114. One or more of the computer systems 102-106 may run a logmonitoring agent that collects and forwards event messages to a logmanagement server that runs on the administration console 114. Asindicated by curved arrows, such as curved arrow 116, multiplecomponents within each of the discrete computer systems 102-106 as wellas the communications bridge/router 110 generate event messages that areforwarded to the log management server. Event messages may be generatedby any event source. Event sources may be, but are not limited to,application programs, operating systems, VMs, guest operating systems,containers, network devices, machine codes, event channels, and othercomputer programs or processes running on the computer systems 102-106,the bridge/router 110 and any other components of the distributedcomputing system. Event messages may be collected at varioushierarchical levels within a discrete computer system and then forwardedto the log management server in the administration computer 112. Forexample, a log monitoring agent may collect and forward the eventmessages at various hierarchical levels. The log management server inthe administration computer 112 collects and stores the received eventmessages in a data-storage device or appliance 118 as event logs120-124. Rectangles, such as rectangle 126, represent individual eventmessages. For example, event log 120 may comprise a list of eventmessages generated within the computer system 102. Each log monitoringagent has an agent monitoring configuration that includes a log path anda log parser. The log path specifies a unique file system path in termsof a directory tree hierarchy that identifies the storage location of anevent log associated with the event source on the administrative console114 or the data-storage device or appliance 118. The log monitoringagent receives specific file and event channel log paths to monitorevent logs and the log parser includes log parsing rules to extract andformat lines of event message into event message fields. The logmonitoring agent then sends the constructed structured event messages tothe log management server. The administrative console 114 and computersystems 102-106 can function without log management agents and a logmanagement server, but with less precision and certainty.

There are many different types of architectures of the computer systems102-106 and 112 that differ from one another in the number of differentmemories, including different types of hierarchical cache memories, thenumber of processors and the connectivity of the processors with othersystem components, the number of internal communications busses andserial links, and in many other ways. FIG. 2 shows a generalarchitectural diagram for various types of computer systems. Thecomputer system contains one or multiple central processing units(“CPUs”) 202-205, one or more electronic memories 208 interconnectedwith the CPUs by a CPU/memory-subsystem bus 210 or multiple busses, afirst bridge 212 that interconnects the CPU/memory-subsystem bus 210with additional busses 214 and 216, or other types of high-speedinterconnection media, including multiple, high-speed serialinterconnects. These busses or serial interconnections, in turn, connectthe CPUs and memory with specialized processors, such as a graphicsprocessor 218, and with one or more additional bridges 220, which areinterconnected with high-speed serial links or with multiple controllers222-227, such as controller 227, that provide access to variousdifferent types of mass-storage devices 228, electronic displays, inputdevices, and other such components, subcomponents, and computationaldevices. It should be noted that computer-readable data-storage devicesinclude optical and electromagnetic disks, electronic memories, andother physical data-storage devices.

FIG. 3 shows an example of a source code 302 of an application program,an operating system, a virtual machine, a container, a guest operatingsystem, or any other computer program or machine code. The source code302 is just one example of an event source that generates eventmessages. Rectangles, such as rectangle 304, represent a definition, acomment, a statement, or a computer instruction that expresses someaction to be executed by a computer. The source code 302 includes logwrite instructions that generate event messages when certain eventspredetermined by the developer occur during execution of the source code302. For example, source code 302 includes an example log writeinstruction 306 that when executed generates an “event message 1”represented by rectangle 308, and a second example log write instruction310 that when executed generates “event message 2” represented byrectangle 312. In the example of FIG. 3, the log write instruction 308is embedded within a set of computer instructions that are repeatedlyexecuted in a loop 314. As shown in FIG. 3, the same event message 1 isrepeatedly generated 316. The same type of log write instructions mayalso be located in different places throughout the source code, which inturns creates repeats of essentially the same type of event message inthe event log.

In FIG. 3, the notation “log.write( )” is a general representation of alog write instruction. In practice, the form of the log writeinstruction varies for different programming languages. In general,event messages are relatively cryptic, including generally only one ortwo natural-language words and/or phrases as well as various types oftext strings that represent file names, path names, and, perhaps variousalphanumeric parameters. In practice, a log write instruction may alsoinclude the name of the source of the event message (e.g., name of theapplication program or operating system and version) and the name of theevent log to which the event message is written. Log write instructionsmay be written in a source code by the developer of an applicationprogram or operating system in order to record events that occur whilean operating system or application program is running. For example, adeveloper may include log write instructions that are executed whencertain events occur, such as failures, logins, or errors.

FIG. 4 shows an example of a log write instruction 402. In the exampleof FIG. 4, the log write instruction 402 includes arguments identifiedwith “$.” For example, the log write instruction 402 includes atime-stamp argument 404, a thread number argument 405, and an internetprotocol (“IP”) address argument 406. The example log write instruction402 also includes text strings and natural-language words and phrasesthat identify the type of event that triggered the log writeinstruction, such as “Repair session” 408. The text strings betweenbrackets “[ ]” represent file-system paths, such as path 410. When thelog write instruction 402 is executed, parameters are assigned to thearguments and the text strings and natural-language words and phrasesare stored as an event message in an event log.

FIG. 5 shows an example of an event message 502 generated by the logwrite instruction 402. The arguments of the log write instruction 402may be assigned numerical parameters that are recorded in the eventmessage 502 at the time the event message is written to the event log.For example, the time stamp 404, thread 405, and IP address 406 of thelog write instruction 402 are assigned corresponding numericalparameters 504-506 in the event message 502. The time stamp 504, inparticular, represents the date and time the event message is generated.The text strings and natural-language words and phrases of the log writeinstruction 402 also appear unchanged in the event message 502 and maybe used to identify the type of event that occurred during execution ofthe application program or operating system.

As event messages are received from various event sources, the eventmessages are stored in the order in which the event messages arereceived. FIG. 6 shows a small, eight-entry portion of an event log 602.In FIG. 6, each rectangular cell, such as rectangular cell 604, of theportion of the event log 602 represents a single stored event message.For example, event message 602 includes a short natural-language phrase606, date 608 and time 610 numerical parameters, as well as, analphanumeric parameter 612 that appears to identify a particular hostcomputer.

FIG. 7 shows an example of event-type analysis performed on the eventmessage 502 shown in FIG. 5. The event message 502 is first tokenized byconsidering the event message as comprising tokens separated bynon-printed characters, referred to as “white space.” In FIG. 7, thisinitial tokenization of the event message 502 is illustrated byunderlining of the printed or visible characters. For example, the date702, time 703, and thread 1804 at the beginning of the text contents ofthe event message 702, following initial tokenization, become a firsttoken 706, a second token 707, and a third token 708, as indicated byunderlining. Next, a token-recognition pass is made to recognize any ofthe initial tokens as various types of parameters. Parameters are tokensor message fields that are likely to be highly variable over a set ofmessages of a particular type. Date/time stamps, for example, are nearlyunique for each event message, with two event messages having anidentical date/time stamp only in the case that the two event messagesare generated within less than a second of one another. Additionalexamples of parameters include global unique identifiers (“GUIDs”),hypertext transfer protocol status values (“HTTP statuses”), universalresource locators (“URLs”), network addresses, and other types of commoninformation entities that identify variable aspects of an event type. Bycontrast, the phrase “Repair session” in event message 502 likely occurswithin each of many repair session event messages. In FIG. 7, theparametric-valued tokens in the event message following initial tokenrecognition are indicated by shading. For example, initial tokenrecognition determines that the first token 706 is a date and the secondtoken 707 is a time. The tokens identified as parameters are identifiedby shaded rectangles, such as shaded rectangle 710 of the date 706 andshaded rectangle of 712 of the time 707. The parametric-valued tokensare discarded leaving the non-parametric text strings, natural languagewords and phrases, punctuation, parentheses, and brackets. Various typesof symbolically encoded values, including dates, times, machineaddresses, network addresses, and other such parameters can berecognized using regular expressions or programmatically. For example,there are numerous ways to represent dates. A program or a set ofregular expressions can be used to recognize symbolically encoded datesin any of the common formats. It is possible that the token-recognitionprocess may incorrectly determine that an arbitrary alphanumeric stringrepresents some type of symbolically encoded parameter when, in fact,the alphanumeric string only coincidentally has a form that can beinterpreted to be a parameter. The currently described methods andsystems do not depend on absolute precision and reliability of theevent-message-preparation process. Occasional misinterpretationsgenerally do not result in mistyping of event messages and, in the rarecircumstances in which event messages may be mistyped, the mistyping ismost often discovered during subsequent processing. In theimplementation shown in FIG. 7, the event message 502 is subject totextualization in which an additional token-recognition step of thenon-parametric portions of the event message is performed in order toremove punctuation and separation symbols, such as parentheses andbrackets, commas, and dashes that occur as separate tokens or that occurat the leading and trailing extremities of previously recognizednon-parametric tokens, as shown by underlining in the retokenized eventmessage 714 in FIG. 7. For example, brackets and a comma 718 areunderlined. The punctuation, parentheses, and brackets are discardedleaving a textualized event message of interest 720 that comprises onlythe non-parametric text strings and natural language words and phrasesof the original event message 502. The textualized event message 720represents an event type. Other textualized event messages with the samenon-parametric text strings and natural language words and phrase as thetextualized event messages 720 are the same event type. Anothertextualized event message with one or more different non-parametric textstrings or natural language words and phrase from those of thetextualized event messages 720 is of a different event type.

Methods to Determine Baseline Event-type Distributions and DetectAbnormal Behavior of Event Sources

FIG. 8 shows an example of random sampling of event messages 802generated by an event source 804. In FIG. 8, the event messages 804 arerecorded an event log 806 as described above. In one implementation,individual event messages and series of event messages recorded in theevent log 806 are randomly sampled. Random sampling includes randomlyselecting an event message or series of event messages, copying theselected event messages, and recording the copied event messages in asubset of event messages of a data-storage device. Shaded boxes identifyrandomly selected event messages, such as shaded box 808, and randomlysampled series of event messages, such as shaded box 810. The randomlyselected event messages are copied and recorded as a block of eventmessages of the much large set of event messages recorded in the eventlog 806. Directional arrows, such as directional arrow 812, representcopying the randomly selected event messages from the event log 806.Directional arrows, such as directional arrow 814, represent collectingthe randomly selected event messages to form a subset of event messages816.

In the example of FIG. 8, the random sampling is performed on eventmessages that have already been recorded in the event log 806. In analternative implementation, random sampling is applied to event messagesas the event messages are generated by the event source 804. Forexample, a randomly selected event message generated by an event sourceis selected, copied, and recorded in as a block of event messages storedin a data-storage device while the original event message is sent andrecorded in the event log 806.

A number N of blocks of event messages are collected for the eventsource. Event type analysis is applied to each block of event messagesto compute a corresponding event-type distribution that comprisesrelative frequencies of different event types recorded in the block ofevent messages. FIG. 9 shows a method of determining an event-typedistribution from event messages recorded in a block of event messages900. In block 902, event-type analysis is applied to each event messageof the block of event messages to determine the event type of each eventmessage. Event-type analysis reduces the event message to text stringsand natural-language words and phrases (i.e., non-parametric tokens), asdescribed above with reference to FIG. 7. The different event types aredenoted by et_(i), where i is an event type index. In block 904, arelative frequency is computed for each event type according to

$\begin{matrix}{D_{i}^{n} = \frac{n\left( {et}_{i} \right)}{L_{n}}} & (1)\end{matrix}$

where

-   -   n(et_(i)) is the number of times an event type, et_(i), appears        in the block of event messages;    -   subscript and superscript n is an integer event-type        distribution index n=1,2, . . . , N; and    -   L_(n) is the total number of event messages in the block of        event messages.        An event-type log 906 is formed from the different event types        and associated relative frequencies. The event-type log 906        comprises a list of the different event types 908 and        corresponding relative frequencies 910 of each event type and        serves as a record of the event-type distribution. FIG. 9 also        shows a histogram 912 of the event-type distribution recorded in        the event-type log 906. Horizontal axis 914 represents the        different event types. Vertical axis 916 represents a range of        relative frequencies. Shaded bars represent the relative        frequency of each event type. For example, shaded bar 918        represents the relative frequency D₃ ^(n) of the event type et₃.        An event-type distribution for M event types in a block of event        messages is denoted by

ET _(n)=(D ₁ ^(n) , D ₂ ^(n) , D ₃ ^(n) , . . . , D _(M) ^(n))   (2)

Each event-type distribution is an M-tuple that corresponds to a datapoint in an M-dimensional space.

According to the maximum entropy principle, the event-type distributionthat best represents the state of the event source and therefore canserve as a baseline event-type distribution is the event-typedistribution with the largest associated entropy. For each of the Nevent-type distributions obtained from N blocks of randomly sampledevent messages generated by the event source as described, an associatedentropy is computed as follows:

$\begin{matrix}{{H\left( {ET}_{n} \right)} = {- {\sum\limits_{m = 1}^{M}{D_{m}^{n}\log_{2}D_{m}^{n}}}}} & (3)\end{matrix}$

The maximum entropy is given by

H _(max)=max{H(ET ₁), H(ET ₂), . . . , H(ET _(N))}  (4)

The event-type distribution with the maximum corresponding entropy,H_(max), is as a baseline even-type distribution for the event sourceand is denoted by

ET _(b)=(D ₁ ^(b) , D ₂ ^(b) , D ₃ ^(b) , . . . , D _(M) ^(b))   (5)

Once the baseline event-type distribution is determined, a normaldiscrepancy radius centered at the baseline event-type distribution isdetermined based on the similarities between pairs of event-typedistributions. In certain implementations, the similarity between a pairof event-type distributions ET_(i) and ET_(j) may be computed using acosine similarity given by:

$\begin{matrix}{{{Sim}_{CS}\left( {{ET}_{i},{ET}_{j}} \right)} = {1 - {\frac{2}{\pi}{\cos^{- 1}\left\lbrack \frac{\sum\limits_{m = 1}^{M}{D_{m}^{i}D_{m}^{j}}}{\sqrt{\sum\limits_{m = 1}^{M}\left( D_{m}^{i} \right)^{2}}\sqrt{\sum\limits_{m = 1}^{M}\left( D_{m}^{j} \right)^{2}}} \right\rbrack}}}} & (6)\end{matrix}$

The closer the similarity Sim_(CS)(ET_(i), ET_(j)) is to zero, thefarther the event-type distributions ET_(i) and ET_(j) are from eachother. The closer the similarity Sim_(CS)(ET_(i), ET_(j)) is to one, thecloser the event-type distributions ET_(i) and ET_(j) are to each other.In another implementation, the similarity between pair of event-typedistributions ET_(i) and ET_(j) may be computed as follows:

$\begin{matrix}{{{Sim}_{Ave}\left( {ET}_{i} \right)} = {\frac{1}{N - 1}{\underset{j \neq i}{\sum\limits_{j = 1}^{N - 1}}{{Sim}\left( {{ET}_{i},{ET}_{j}} \right)}}}} & (8)\end{matrix}$

The similarity in Equation (7) is based on the Jensen-Shannon divergenceand, like the cosine similarity, and is used to measure the similaritybetween two distributions ET_(i) and ET_(j). The closer Sim_(JS)(ET_(i),ET_(j)) is to one, the more similar the distributions ET_(i) and ET_(j)are to one another. The closer Sim_(JS)(ET_(i), ET_(j)) is to zero, themore dissimilar the distributions ET_(i) and ET_(j) are to one another.In the following discussion, the similarity Sim(ET_(i), ET_(j))represents the similarity Sim_(CS)(ET_(i), ET_(j)) or the similaritySim_(JS)(ET_(i), ET_(j)).

FIG. 10A shows a table of similarities computed between each pair ofevent-type distributions ET_(i) and ET_(j) for i=1, 2, . . . , N andj=1, 2, . . . , N with j≠i. The average similarity of each event-typedistribution is given by:

$\begin{matrix}{{{Sim}_{Ave}\left( {ET}_{i} \right)} = {\frac{1}{N - 1}{\sum\limits_{\underset{j \neq i}{j = 1}}^{N - 1}\; {{Sim}\left( {{ET}_{i},{ET}_{j}} \right)}}}} & (8)\end{matrix}$

The average similarities form a set of average similarities representedby:

{Sim_(Ave)(ET₁),Sim_(Ave)(ET₂), . . . ,Sim_(Ave)(ET_(N))}

The average similarities are rank ordered from smallest to largest. FIG.10B shows an example set of average similarities plotted along a numberline 1002 between zero and one. Solid dots, such as solid dot 1004,represent the values of averages similarities. The largest averagesimilarity is denoted by Sim_(Ave)(max) and the smallest averagesimilarity is denoted by Sim_(Ave)(min). A select number L of thelargest average similarities are identified as the dominant averagesimilarities with a minimum average similarity in the dominant averagesimilarities denoted by Sim*_(Ave)(min), whereSim*_(Ave)(min)>Sim_(Ave)(min). Dot 1006 represents the minimum averagesimilarity of the set of dominant similarities denoted bySim*_(Ave)(min). Average similarities less than Sim*_(Ave)(min) areignored or discarded. A normal discrepancy radius 1008 is calculated asthe difference between the maximum and minimum average similarities ofthe dominant average similarities as follows:

NDR=Sim_(Ave)(max)−Sim*_(Ave)(min)   (9)

The normal discrepancy radius is used to calculate a normal discrepancyradius threshold given by:

Th _(NDR)=Sim_(Ave)(ET _(b))−NDR   (10)

where Sim_(Ave)(ET_(b)) is the average similarity of the baselineevent-type distribution.

In FIG. 10B, dashed line 1012 represents the normal discrepancy radiusthreshold.

FIG. 11 shows run-time event messages 1102 recorded in an event log 806.Behavior of the event source 804 is monitored with sets of consecutiverun-time event messages. The time t_(c) represents a randomly orperiodically selected point in time when identification of run-timeevent messages begins. Shaded box 1102 identifies run-time eventmessages that comprise a fixed number Q of the most recent,consecutively generated event messages after the time t_(c). Event-typeanalysis is applied to the run-time event messages 1104 copied from theevent log 806, as described above with reference to FIG. 9, to obtain acorresponding run-time event-type distribution 1106 represented by

ET _(rt)=(D ₁ ^(rt) , D ₂ ^(rt) , D ₃ ^(rt) , . . . , D _(M) ^(rt))  (11)

An average similarity of the run-time event-type distribution and theevent-type distributions is computed as follows:

$\begin{matrix}{{{Sim}_{Ave}\left( {ET}_{rt} \right)} = {\frac{1}{N}{\sum\limits_{j = 1}^{N}\; {{Sim}\left( {{ET}_{rt},{ET}_{j}} \right)}}}} & (12)\end{matrix}$

When the average similarity of the run-time event-type distributionssatisfies the condition:

Sim_(Ave)(ET _(rt))≤Th _(NDR)  (13a)

the event source is assumed to be in a normal state and no alert isgenerated. On the other hand, when the average similarity of therun-time event-type distributions satisfies the condition:

Th _(NDR)>Sim_(Ave)(ET _(rt))   (13b)

an alert is generated indicating that the event source has entered anabnormal state.

Additional severity-level thresholds Th₁ and Th₂ that distinguishseverity levels of abnormal behavior of the event source can be used togenerate alerts that identify the severity of the alert as follows:

Th₂<Th₁<Th_(NDR)  (13c)

When Th₁<Sim_(Ave)(ET_(rt))<Th_(NDR) the alert may be identified as awarning. When Th₂<Sim_(Ave)(ET_(rt))<Th₁, the alert may be identified asan error. When Sim_(Ave)(ET_(rt))<Th₂, the alert may be identified ascritical and the event source may be shut down or taken off line.

Returning to FIG. 10B, when the average similarity of the run-timedistributions is less than the threshold 1010, as represented bydirectional arrow 1012, an alert is generated indicating that the eventsource has entered an abnormal state. When the average similarity of therun-time distributions is greater than the threshold 1010, asrepresented by directional arrow 1014, the event source is assumed to bein normal state and no alert is generated.

The number N of event-type distributions and select number of Levent-type distributions that are candidate baseline event-typedistributions may be determined based on a percentage of the time theevent source maintains a normal state. The percentage of the time theevent source maintains a normal operational state is P×100%, where P isthe probability the event source is in a normal state when an eventmessage is collected. Each randomly sampled event message is independentand does change the probability of randomly selecting another eventmessage. For example, when normal state probability is P=0.99, thenthere is a 99% chance that a randomly sampled event message or portionof event messages, as described above with reference to FIG. 8, iscollected during a normal state of the event source. On the other hand,there is a 1% chance that a randomly sampled event message or portion ofevent messages is collected during an abnormal state of the eventsource.

The binomial distribution gives the probability of generating Lcandidate baseline event-type distributions from randomly sampled eventmessages generated by the event source in a normal state out a total ofN event-type distributions generated from randomly sampled eventmessages:

$\begin{matrix}{{{Prob}\left( {L\mspace{11mu} {successes}\mspace{14mu} {in}\mspace{14mu} N\mspace{14mu} {trials}} \right)} = {{\begin{pmatrix}N \\L\end{pmatrix}{P^{L}\left( {1 - P} \right)}^{N - L}\mspace{14mu} {{where}\begin{pmatrix}N \\L\end{pmatrix}}} = \frac{N!}{{L!}{\left( {N - L} \right)!}}}} & \left( {14a} \right)\end{matrix}$

The probability of L or more candidate baseline event-type distributionsgenerated from randomly sampled event messages generated by the eventsource in a normal state is computed from the cumulative binomialdistribution:

$\begin{matrix}{{P_{cum}\left( {X \geq L} \right)} = {{\sum\limits_{i = L}^{N}{\begin{pmatrix}N \\i\end{pmatrix}{P^{i}\left( {1 - P} \right)}^{N - i}\mspace{14mu} {where}\mspace{14mu} L}} \leq {N.}}} & \left( {14b} \right)\end{matrix}$

The cumulative binomial distribution of Equation (14b) is a confidencelevel that L of the N event-type distributions and candidate event-typedistributions will be obtained when the event source is in a normalstate.

Three examples of normal state probabilities and associated total numberN of event-type distributions and confidence levels that L of the Nevent-type distributions are candidate event-type distributions that arerepresentative of the event source in a normal state are provided in thetable:

P N ET distributions L ET distributions P_(cum) 0.99 5 4 0.9990 0.95 7 40.9998 0.90 8 4 0.9996The above table indicates that when the normal state probability is0.99, five (i.e., N=5) event-type distributions are generated fromrandomly selected event messages, as described above with referenceFIGS. 8 and 9. The confidence level of 0.9990 indicates that four (i.e.,L=4) of the five are candidate baseline event-type distributions withthe largest average similarities can be used to generate a normaldiscrepancy radius as described above with reference to FIG. 10B andEquation (8), and the candidate baseline event-type distribution withthe largest entropy computed as described above with reference toEquations (3) and (4) is the baseline event-type distributions. When thenormal state probability is 0.95, seven (i.e., N=7) event-typedistributions are generated from randomly selected event messages, asdescribed above with reference FIGS. 8 and 9. The confidence level of0.9998 indicates that four (i.e., L=4) of the seven are candidatebaseline event-type distributions with the four largest averagesimilarities can be used to generate a normal discrepancy radius asdescribed above with reference to FIG. 10B and Equation (8), and thecandidate baseline event-type distribution with the largest entropycomputed as described above with reference to Equations (3) and (4) isthe baseline event-type distributions. When the normal state probabilityis 0.90, eight (i.e., N=8) event-type distributions are generated fromrandomly selected event messages, as described above with referenceFIGS. 8 and 9. The confidence level of 0.9996 indicates that four (i.e.,L=4) of the eight are candidate baseline event-type distributions withthe four largest average similarities can be used to generate a normaldiscrepancy radius as described above with reference to FIG. 10B andEquation (8), and the candidate baseline event-type distribution withthe largest entropy computed as described above with reference toEquations (3) and (4) is the baseline event-type distributions.

In an alternative implementation, rather that forming a block of eventmessages from random sampling of event messages as described above,blocks of event messages can be generated by copying consecutivelyrecorded event messages generated by event source. Event-type analysisis applied to each block of event messages as described above withreference to FIG. 9 to obtain an associated event-type distribution.

FIG. 12 shows examples of blocks of event messages 1201-1203 obtainedfrom copying corresponding consecutively recorded event messages1205-1207, respectively. In the example of FIG. 12, the blocks of eventmessages 1205-1207 overlap by four event messages. In otherimplementations, blocks of event messages can be obtained fromnon-overlapping consecutively recorded event messages. Event-typeanalysis as described above with reference to FIG. 9 is applied to eventmessages in each block of event messages in order to obtain acorresponding event-type distribution. For example, event-typedistributions 1211-1213 are obtained from corresponding blocks of eventmessages 1201-1203.

Event-type distributions are M-tuples in an M-dimensional space. FIG.13A shows a random scattering of M-tuples in an example M-dimensionalspace. Each M-tuple represents an event-type distribution obtained froma block of event messages, as described above with reference to FIG. 12.For example, dots 1301-1303 are M-tuples that represent event-typedistributions ET_(j), ET_(j+1), and ET_(j+2).

A local outlier factor (“LOF”) is computed for each event-typedistribution in the M-dimensional space represented by a set ofevent-type distributions:

C=(ET ₁ , ET ₂ , . . . , ET _(N))   (15)

Computation of a local outlier factor begins by computing a distancebetween each pair of event-type distributions in the M-dimensionalspace. In certain implementations, the distance between each pair ofevent-type distributions is computed using a cosine distance given by:

$\begin{matrix}{{{Dist}_{CS}\left( {{ET}_{i},{ET}_{j}} \right)} = {\frac{2}{\pi}{\cos^{- 1}\left\lbrack \frac{\sum_{m = 1}^{M}{D_{m}^{i}D_{m}^{j}}}{\sqrt{\sum_{m = 1}^{M}\left( D_{m}^{i} \right)^{2}}\sqrt{\sum_{m = 1}^{M}\left( D_{m}^{j} \right)^{2}}} \right\rbrack}}} & (16)\end{matrix}$

The closer the distance Dist_(CS)(ET_(i), ET_(j)) is to zero, the closerthe event-type distributions ET_(i) and ET_(j) are to each other. Thecloser the distance Dist_(CS)(ET_(i), ET_(j)) is to one, the fartherdistributions ET_(i) and ET_(j) are from each other. In anotherimplementation, the distance between event-type distributions may becomputed using Jensen-Shannon divergence:

$\begin{matrix}{{{{Dist}_{JS}\left( {{ET}_{i},{ET}_{j}} \right)} = {{- {\sum\limits_{m = 1}^{M}\; {M_{m}\log_{2}M_{m}}}} + {{\frac{1}{2}\left\lbrack {{\sum\limits_{i = 1}^{M}{D_{m}^{i}\log^{2}D_{m}^{i}}} + {\sum\limits_{i = 1}^{m}{D_{m}^{j}\log^{2}D_{m}^{j}}}} \right\rbrack}\mspace{14mu} {where}}}}\mspace{20mu} {M_{m} = {\left( {D_{m}^{i} + D_{m}^{j}} \right)\text{/}2.}}} & (17)\end{matrix}$

The Jensen-Shannon divergence ranges between zero and one and has theproperties that the distributions ET_(i) and ET_(j) are similar thecloser Dist_(JS)(ET_(i), ET_(j)) is to zero and are dissimilar thecloser Dist_(JS)(ET_(i), ET_(j)) is to one. In the following discussion,the distance Dist(ET_(i), ET_(j)) represents the distanceDist_(CS)(ET_(i), ET_(j)) or the distance Dist_(JS)(ET_(i), ET_(j)).

For each event-type distribution ET_(i), i=1, . . . , N, the distancesdist(ET_(i), ET_(j)) are rank ordered for j=1, . . . , N and j≠i. TheK-th nearest neighbor distance of the rank ordered distances for theeven-type distribution ET_(i) is determined and denoted bydist_(K)(ET_(i)), where K is a selected natural number. The K-th nearestneighbor distance dist_(K)(ET₁) is called the K-distance. Given theK-distance, a K-distance neighborhood of event-type distributions with adistance to the event-type distribution ET_(i) that is less than orequal to the K-distance is given by:

N _(K)(ET _(i))={ET _(j) ∈C\{ET _(i)}|dist(ET _(i) , ET_(j))≤dist_(K)(ET _(i))}  (18)

A local reachability density is computed for the event-type distributionET_(i) as follows:

$\begin{matrix}{{{lrd}\left( {ET}_{i} \right)} = \frac{{N_{K}\left( {ET}_{i} \right)}}{{\sum_{{ET}_{j} \in {N_{K}{({ET}_{i})}}}{reach}} - {{dist}_{K}\left( {{ET}_{i},{ET}_{j}} \right)}}} & (19)\end{matrix}$

where

-   -   ∥N_(K)(ET_(i))∥ is the number of event-type distributions in the        K-distance neighborhood N_(K)(ET_(i)); and    -   reach−dist_(K)(ET_(i), ET_(j)) is the reachability distance of        the event-type distribution ET_(i) to the event-type        distribution ET_(j).        The reachability distance is given by:

reach−dist_(K)(ET _(i) , ET _(j))=max{dist_(K)(ET _(i)), dist(ET _(i) ,ET _(j))}  (20)

where j=1, . . . , N and j≠i.

An LOF is computed for the event-type distribution ET_(i) as follows:

$\begin{matrix}{{{LOF}\left( {ET}_{i} \right)} = \frac{\sum_{{ET}_{j} \in {N_{K}{({ET}_{i})}}}\frac{{lrd}\left( {ET}_{j} \right)}{{lrd}\left( {ET}_{i} \right)}}{{N_{K}\left( {ET}_{i} \right)}}} & (21)\end{matrix}$

The LOF of Equation (21) is an average local reachability density of theneighboring coordinate data points divided by the local reachabilitydensity. An LOF is computed for each event-type distribution in C. FIG.13B shows LOF's computed for each event-type distribution in theM-dimensional space of FIG. 13A.

The LOF's determined for the event-type distributions are rank orderedand an event-type distribution, ET_(c), with the smallest correspondingLOF is the baseline event-type distribution LOF(ET_(b))≤LOF(ET_(j)) forj=1, . . . , N and b≠j. Ideally, the smallest LOF is unique and thecorresponding event-type distribution is the baseline event-typedistribution. In the case where there are two or more equal value LOFminima, the corresponding two or more event-type distributions arecandidate baseline event-type distributions. Entropies of the two ormore candidate baseline event-type distributions are computed. Thecandidate baseline event-type distribution with the largestcorresponding entropy is identified at the only baseline event-typedistribution. For example, suppose there are two candidate baselineevent-type distributions ET_(b) ₁ and ET_(b) ₂ with minimum LOF(ET_(b) ₁)=LOF(ET_(b) ₂ ). The corresponding entropies of the two candidatebaseline event-type distributions are computed as follows:

$\begin{matrix}{{H\left( {ET}_{b_{1}} \right)} = {- {\sum\limits_{m = 1}^{M}{D_{m}^{b_{1}}\log^{2}D_{m}^{b_{1}}}}}} & \left( {22a} \right) \\{{H\left( {ET}_{b_{2}} \right)} = {- {\sum\limits_{m = 1}^{M}{D_{m}^{b_{2}}\log^{2}D_{m}^{b_{2}}}}}} & \left( {22b} \right)\end{matrix}$

If H(ET_(b) ₁ )>H(ET_(b) ₂ ), then the candidate baseline event-typedistribution ET_(b) ₁ is the baseline event-type distribution. IfH(ET_(b) ₂ )>H(ET_(b) ₁ ), then the candidate baseline event-typedistribution ET_(b) ₂ is the baseline event-type distribution.

In another implementation, an event-type distribution having a minimumaverage distance to the other event-type distributions in theM-dimensional space is identified as the baseline event-typedistribution. FIG. 14 shows a matrix of distances computed between eachevent-type distribution to each of the other event-type distributions.The average distance of each event-type distribution from the otherevent-type distributions is located below each column and is computed asfollows:

$\begin{matrix}{{{Dist}^{A}\left( {ET}_{i} \right)} = {\frac{1}{N - 1}{\sum\limits_{{j = 1},{j \neq i}}^{N}\; {{Dist}\left( {{ET}_{i},{ET}_{j}} \right)}}}} & (23)\end{matrix}$

For example, column 1402 is a list of distances computed between theeven-type distribution ET₁ and each of the event-type distributions ET₂,ET₃, . . . , and ET_(N). The average distance from the even-typedistribution ET₁ to the other event-type distributions ET₂, ET₃, . . . ,and ET_(N) is denoted by Dist^(A)(ET₁). The event-type distribution withthe minimum average distance is identified as the baseline event-typedistribution ET_(b) for the event-type distributions in theM-dimensional space.

A mean distance from the baseline event-type distribution to otherevent-type distributions is computed as follows:

$\begin{matrix}{{\mu \left( {ET}_{b} \right)} = {\frac{1}{N - 1}{\sum\limits_{{j = 1},{j \neq b}}^{N}\; {{Dist}\left( {{ET}_{b},{ET}_{j}} \right)}}}} & \left( {24a} \right)\end{matrix}$

A standard deviation of distance from the baseline event-typedistribution to other event-type distributions is computed as follows:

$\begin{matrix}{{{std}\left( {ET}_{b} \right)} = \sqrt{\frac{1}{N - 1}{\sum\limits_{{j = 1},{j \neq b}}^{N}\; \left( {{{Dist}\left( {{ET}_{b},{ET}_{j}} \right)} - {\mu \left( {ET}_{b} \right)}} \right)^{2}}}} & \left( {24b} \right)\end{matrix}$

When the event-type distributions are normally distributed about themean given by Equation (24a), the normal discrepancy radius is given by:

NDR_(±)=μ(ET _(b))±B*std(ET _(b))   (25)

where B is an integer number of standard deviations (e.g., B=3) from themean in Equation (24a).

The normal discrepancy radius is centered at the mean distance from thebaseline event-type distribution to other event-type distributions givenby Equation (25). When the average distance of a run-time event-typedistribution ET_(rt) to the event-type distributions is obtained asdescribed above with reference to FIG. 11 satisfies the followingcondition:

NDR≤Dist^(A)(ET _(rt))≤NDR ₊  (26a)

where the average distance of the run-time event-type distributionET_(rt) to the event-type distributions is given by:

$\begin{matrix}{{{Dist}^{A}\left( {ET}_{rt} \right)} = {\frac{1}{N}{\sum\limits_{j = 1}^{N}\; {{Dist}\left( {{ET}_{rt},{ET}_{j}} \right)}}}} & \left( {26b} \right)\end{matrix}$

The event source is in a normal state. On the other hand, when theaverage distance satisfies either of the following conditions:

Dist^(A)(ET _(rt))≤NDR or NDR ₊≤Dist^(A)(ET _(rt))   (26c)

the event source is in an abnormal state.

Additional thresholds may be used to identify a severity level for theabnormal state of the event source. In one implementation, additionalseverity-level thresholds that distinguish severity levels of abnormalbehavior of the event source can be used to generate alerts thatidentify the severity of the problem as follows:

NDR₊ <Th ₁ ⁺ <Th ₂ ⁺  (26d)

When NDR₊<Dist^(A)(ET_(rt))<Th₁ ⁺ the alert may be identified as awarning. When Th₁ ⁺<Dist^(A)(ET_(rt))<Th₂ ⁺, the alert may be identifiedas an error. When Th₂ ⁺<Dist^(A)(ET_(rt)), the alert may be identifiedas critical and the event source may be shut down or taken off line.Analogous severity-level thresholds may be defined and used with NDR_ asfollows:

NDR>Th ₁ ⁻ >Th ₂ ⁻  (26e)

When NDR_>Dist^(A)(ET_(rt))>Th₁ ⁻ the alert may be identified as awarning. When Th₁ ⁻>Dist^(A)(ET_(rt))>Th₂ ⁻, the alert may be identifiedas an error. When Th₂ ⁻>Dist^(A)(ET_(rt)), the alert may be identifiedas critical and the event source may be shut down or taken off line.

In an alternative implementation, when the event-type distribution aboutthe mean is unknown, the Chebyshev's inequality may be used to compute anormal discrepancy radius given by:

NDR_(±)=μ(ET _(b))±k*std(ET _(b))   (27a)

where k>1.

The Chebyshev inequality states that

$\begin{matrix}{{P\left( {{{{{Dist}^{A}\left( {ET}_{rt} \right)} - {\mu \left( {ET}_{b} \right)}}} \geq {k \cdot {{std}\left( {ET}_{b} \right)}}} \right)} \leq \frac{1}{k^{2}}} & \left( {27b} \right)\end{matrix}$

An event source may operate in two or more normal states or modes. Forexample, an event source may have high, medium, and low usage states. Asa result, the event-type distributions in the M-dimensional space mayalso clustered according to the different normal states. Clusteringtechniques may be used to determine the different clusters of event-typedistributions. K-means clustering is applied to the full set ofevent-type distributions with an initial set of cluster centroidsdenoted by {q_(j)}_(j=1) ^(k). The locations of the k cluster centersare recalculated with each iteration to obtain k clusters. Eachevent-type distribution ET_(n) assigned to one of the k clusters definedby:

C _(i) ^((m)) ={ET _(n) :|ET _(n) −q _(i) ^((m)) |≤|ET _(n) −q _(j)^((m)) |∀j,1≤j≤k}  (28)

where

-   -   C_(i) ^((m)) is the i-th cluster i=1, 2, . . . , k; and    -   m is an iteration index m=1, 2, 3, . . . .        The cluster centroid q_(i) ^((m)) is the mean value of the        event-type distribution in the i-th cluster, which is computed        as follows:

$\begin{matrix}{q_{i}^{({m + 1})} = {\frac{1}{C_{i}^{(m)}}{\sum\limits_{{ET}_{n} \in C_{i}^{(m)}}\; {ET}_{n}}}} & (29)\end{matrix}$

where |C_(i) ^((m))| is the number of event-type distributions in thei-th cluster.

For each iteration m, Equation (28) is used to determine if anevent-type distribution ET_(n) belong to the i-th cluster followed bycomputing the cluster center according to Equation (29). Thecomputational operations represented by Equations (28) and (29) arerepeated for each value of m until the event-type distributions assignedto the k clusters do not change. The resulting clusters are representedby:

C _(i) ={ET _(p)}_(p) ^(N) ^(i)   (30)

where

-   -   N_(i) is the number of data points in the cluster C_(i);    -   i=1,2, . . . , k; and    -   p is a cluster data point subscript.        K++ means clustering, or Gaussian-based clustering, can be used        to optimize the number of k centroids of k clusters of        event-type distributions in the M-dimensional space. For        example, k-means cluster may be started with k=1 cluster centers        and k++ means clustering or Gaussian-based clustering are        applied to k-means clustering to optimize the number of        clusters.

FIG. 15 shows an example of three event-type distribution clusters1501-1503 (i.e., k=3) in an M-dimensional space for an event source thatoperates in three different normal states. Unshaded hexagonal-shapeddots 1505-1507 represent centroids the clusters 1501-1503. A baselineevent-type distribution computed for each cluster is the event-typedistribution with the smallest LOF of event-type distributions in thecluster, as described above with reference to FIGS. 13A-13B andEquations (14)-(21). Alternatively, a baseline event-type distributioncomputed for each cluster is the event-type distribution with theminimum average distance to the other event-type distributions withinthe same cluster, as described above with reference to Equation (22).Circled data points 1505-1507 are baseline event-event distributions foreach cluster. The normal discrepancy radius is computed for each clusteraccording to Equations (25a)-(25c) or Equation (26).

When a run-time event-type distribution ET_(rt) violates a normaldiscrepancy radius, as described above with reference to Equations (13b)and (26c), a mismatch between the relative frequencies of each eventtype of the run-time event-type distribution ET_(rt) and the baselineevent-type distribution ET_(b). For each event type, m=1,2, . . . , M,an event-type mismatch is computed as follows:

mis_(m) =|D _(m) ^(rt) −D _(m) ^(b)|  (31)

The event-type mismatches can be rank ordered from largest to smallestand displayed on system administrators console in order to enable asystem administrator to observe how the event types have changed whenthe event source enters an abnormal state.

FIG. 16A shows a plot of an example run-time event-type distributionET_(rt) and a baseline event-type distribution ET_(b) for twenty eventtypes. The run-time event-type distribution is substantially differentfrom the baseline event-type distribution and has violated acorresponding normal discrepancy radius as described above. Horizontalaxis 1601 represents a range of the event types. Vertical axis 1602represents a range of relative frequencies. Hash-marked bars, such asbar 1604, represent the relative frequency of the baseline event types.Shaded bars, such as bar 1606, represent the relative frequency of therun-time even types. FIG. 16B shows a plot of rank ordered absolutevalues (i.e., |mis_(m)|) of the event-type mismatches computed betweenthe relative frequencies of the event types. Each bar represents anabsolute value of an event-type mismatch. The absolute values aredisplayed in rank order from largest to smallest. For example, eventtypes et₃ and et₁₆ experienced the greatest change in frequency whileevent types et₄ and et₁₄ experienced the smallest change in frequency.FIG. 16C shows a plot of event-type mismatches rank ordered from largestpositive value to largest negative value. The plot in FIG. 16C revealsthat event types et₃ decreased and event types et₁₆ increased infrequency. Example plots in FIGS. 16A-16C may be displayed on a systemadministration console to enable system administrators visuallyinspection of how event types generated by an event source change intransitioning from a normal state to an abnormal state. The eventmessages of event types with the largest magnitude event-type mismatchmay be collected and displayed to enable a system administrator anopportunity to investigate and trouble shoot the source of theabnormality.

The methods described below with reference to FIGS. 17-24 are stored inone or more data-storage devices as machine-readable instructions thatwhen executed by one or more processors of the computer system shown inFIG. 2 to detect abnormal behavior of an event sources.

FIG. 17 shows control-flow diagram of a method to determine a baselineevent-type distribution and detect abnormal behavior of an event source.In block 1701, blocks of randomly selected event messages generated byan event source are formed as described above with reference to FIG. 8.The number N of blocks of event messages may be determined by the normalstate probability P, which is the percentage of the time the eventsource maintains a normal state. Using the normal state probability, thenumber of blocks N is computed using the cumulative binomialdistribution as described above with reference to Equation (14b). Inblock 1702, an event-type distribution is computed for each block ofevent messages formed in the block 1701, as described above withreference to FIG. 9. In block 1703, a routine “determine baselineevent-type distribution” is called to compute a baseline even-typedistribution. In block 1704, a routine “determine normal discrepancyradius” is called. In block 1705, a block of run-time event messages iscollected as described above with reference to FIG. 11. In block 1706, arun-time event-type distribution is computed for the block of run-timeevent messages as described above with reference to FIG. 9. In block1707, an average similarity of the run-time event-type distribution andthe event-type distributions of each block of event messages iscomputed, as described above with reference to Equation (12). Indecision block 1708, when the average similarity of the run-timeevent-type distribution is not within the normal discrepancy radiusthreshold of the event-type distributions, as described above withreference to Equation (13b), control flows to block 1707. In block 1709,an alert is generated and the criticality of the alert is determined asdescribed above with reference to Equations (13c) and (26d). In decisionblock 1710, when another block of run-time event messages is received,control flows back to block 1705.

FIG. 18 shows a control-flow diagram of the routine “determine baselineevent-type distribution” called in block 1703 of FIG. 17. In block 1801,a maximum entropy H_(max) is initialized to zero. A loop beginning withblock 1802 repeats the computational operations of blocks 1803-1806 foreach event-type distribution determined in block 1702 of FIG. 17. Inblock 1803, an entropy is computed for each event-type distribution asdescribed above with reference to Equation (3). In decision block 1804,when the entropy computed in block 1803 is greater than the parameterH_(max), control flows to block 1805. Otherwise control flows to block1806. In block 1805, maximum entropy is reassigned the entropy computedin block 1803. In decision block 1806, when all event-type distributionshave been considered control flows to block 1807. In block 1807, theevent-type distribution with maximum entropy is identified as baselineevent-type distribution.

FIG. 19 shows a control-flow diagram of the routine “determine normaldiscrepancy radius” called in block 1704 of FIG. 17. In block 1901, anaverage similarity is computed for each event-type distribution asdescribed above with reference to FIG. 10A and Equation (8). In block1902, the L largest average similarities are rank ordered, where L isdetermined based on the cumulative binomial distribution, as describedabove with reference to Equation (14b). In block 1903, determine themaximum and minimum average similarities of the L largest averagesimilarities, as described above with reference to FIG. 10B. In block1904, compute a normal discrepancy radius as a difference between themaximum and minimum average similarities as described above withreference to Equation (9).

FIG. 20 shows a control-flow diagram of a method to determine a baselineevent-type distribution and detect abnormal behavior of an event source.In block 2001, blocks of event messages generated by an event source arecollected as described above with reference to FIG. 12. In block 2002,an event-type distribution is computed for each block of event messagesas described above with reference to FIGS. 9 and 12. In block 2003,clusters of event-type messages that correspond to different normalstates are determined as described above with reference to Equations(28) and (29). A loop beginning with block 2004 repeats the operationsof blocks 2005 and 2006 for each cluster of event-type distributions. Inblock 2005, a routine “determine baseline event-type distribution” iscalled to compute a baseline even-type distribution. In block 2006, aroutine “determine normal discrepancy radius” is called. In decisionblock 2007, control flows to block 2008 when blocks 2005 and 2006 havebeen repeated for each cluster of event-type distributions. In block2008, a block of run-time event messages is collected as described abovewith reference to FIG. 11. In block 2009, a run-time event-typedistribution is computed for the run-time event messages as describedabove with reference to FIG. 9. In block 2010, a routine “determinewhich cluster run-time event-type distribution belongs to” is called. Inblock 2011, average distance from run-time distribution to event-typedistributions in the cluster is computed, as described above withreference to Equation (26b). In decision block 2012, when the averagedistance of the run-time event-type distribution is not within thenormal discrepancy radius of the cluster associated with the run-timeevent-type distribution, control flows to block 2013. In block 2013, analert is generated and the criticality of the alert is as describedabove with reference to Equations (26d) and (26e). In decision block2014, when another block of run-time event messages are received,control flows back to block 2008.

FIG. 21 shows a control-flow diagram of the routine “determine baselineeven-type distribution” called in block 2005 of FIG. 20. A loopbeginning with block 2101 repeats the operation represented by block2102 for each event-type distribution. In block 2102, an LOF is computedfor each event-type distribution as described above with reference toEquations (15)-(21). In decision block 2103, when an LOF has beencomputed for each event-type distribution, control flows to block 2104.In block 2104, a minimum LOF determined from the LOF computed in block2102. In decision block 2105, when two or more minimum LOFs are equal,control flows to block 2107. Otherwise, control flows to block 2106. Inblock 2106, the event-type distribution with the minimum LOF isidentified as the baseline event-type distribution. In block 2107, amaximum entropy H_(max) is initialized to zero. A loop beginning withblock 2108 repeats the computational operations of blocks 2109-2112 foreach event-type distribution. In block 2109, an entropy is computed foreach event-type distribution as described above with reference toEquation (3). In decision block 2110, when the entropy computed in block2109 is greater than the maximum entropy H_(max), control flows to block2111. Otherwise control flows to block 2112. In block 2111, the maximumentropy is reassigned the entropy computed in block 2109. In decisionblock 2112, when all event-type distributions have been consideredcontrol flows to block 2113. In block 2113, the event-type distributionwith minimum LOF and maximum entropy is identified as the baselineevent-type distribution.

FIG. 22 shows a control-flow diagram of the routine “determine baselineeven-type distribution” called in block 2005 of FIG. 20. A loopbeginning with block 2201 repeats the computational operationrepresented by block 2202 for each event-type distribution computed inblock 2002 of FIG. 20. In block 2202, an average distance from theevent-type distribution to other event-type distributions is computed asdescribed above with reference to FIG. 14 and Equation (23). In decisionblock 2203, when an average distance has been computed for eachevent-type distribution control flows to block 2204. In block 2204, aminimum average distance is determined from the distances. In block2205, the event-type distribution with the minimum average distance isidentified as the baseline event-type distribution.

FIG. 23 shows a control-flow diagram of the routine “determine normaldiscrepancy radius” called in block 2006 of FIG. 20. In block 2301, amean distance is computed as from the baseline event-type distributionto the other event-type distributions, as described above with referenceto Equation (24a). In block 2302, a standard deviation of distances iscomputed as described above with reference to Equation (24b). In block2303, a normal discrepancy radius is computed as described above withreference to Equation (25) or Equation (26).

FIG. 24 shows a control-flow diagram of the routine “determine whichcluster run-time event-type distribution belongs to” called in block2010 of FIG. 20. A loop beginning with block 2401 repeats thecomputational operation of block 2402 for each cluster determined inblock 2003 of FIG. 20. In block 2402, a distance is computed from therun-time event-type distribution and the baseline event-typedistribution of the cluster using Equation (16) or Equation (17). Indecision block 2403, control flows to block 2404, when the distance hasbeen computed for the clusters. In block 2404, determined minimumdistance of the distances computed in block 2402. In block 2405,run-time event-type distribution is identified as belonging to thecluster with the smallest distance.

It is appreciated that the previous description of the disclosedembodiments is provided to enable any person skilled in the art to makeor use the present disclosure. Various modifications to theseembodiments will be apparent to those skilled in the art, and thegeneric principles defined herein may be applied to other embodimentswithout departing from the spirit or scope of the disclosure. Thus, thepresent disclosure is not intended to be limited to the embodimentsshown herein but is to be accorded the widest scope consistent with theprinciples and novel features disclosed herein.

1. A method stored in one or more data-storage devices and executedusing one or more processors of a computer system to detect abnormalbehavior of an event source, the method comprising: computing a normaldiscrepancy radius threshold based on event messages generated by theevent source; computing an average similarity between a block ofrun-time event messages generated by the event source and the eventmessages; and generating an alert indicating abnormal behavior of theevent source when the average similarity is greater than the normaldiscrepancy radius threshold.
 2. The method of claim 1 wherein computingthe normal discrepancy radius threshold comprises: computing anevent-type distribution for each block of event messages generated bythe event source; determining a baseline event-type distribution of theevent-type distributions, the baseline event-type distribution havingthe largest entropy of the event-type distributions; and computing thenormal discrepancy radius threshold based on the event-typedistributions centered at the baseline event-type distribution.
 3. Themethod of claim 2 further comprising forming each block of eventmessages by randomly selected event messages from an event log of theevent source.
 4. The method of claim 2 wherein determining the baselineevent-type distribution of the event-type distributions comprises:computing an entropy for each event-type distribution; determining amaximum entropy of the entropies computed for each event-typedistribution; and identifying the event-type distribution with themaximum entropy as the baseline event-type distribution.
 5. The methodof claim 1 wherein computing the normal discrepancy radius thresholdcomprises: computing event-type distributions from blocks of eventmessages previously generated by the event source; computing asimilarity between each event-type distribution and other event-typedistributions; computing an average similarity of each event-typedistribution based on the similarities computed between the event-typedistribution and the event-type distributions; rank order the averagesimilarities obtained for event-type distribution from maximum tominimum average similarities; calculating a normal discrepancy radius asa difference between the maximum and minimum average similarities; andcalculating a normal discrepancy radius threshold as a differencebetween the average similarity of the baseline event-type distributionand normal discrepancy radius.
 6. The method of claim 1 whereincomputing the average similarity comprises: computing event-typedistributions from blocks of event messages previously generated by theevent source; computing a run-time event-type distribution from a blockof the run-time event messages; computing a similarity between therun-time event-type distribution and each of the event-typedistributions; and computing an average similarity of run-timeevent-type distribution based on the similarities computed between therun-time event-type distribution and the event-type distributions.
 7. Acomputer system that detects abnormal behavior of an event source, thesystem comprising: one or more processors; one or more data-storagedevices; and machine-readable instructions stored in the one or moredata-storage devices that when executed using the one or more processorscontrols performs the operations comprising: computing a normaldiscrepancy radius threshold based on event messages generated by theevent source; computing an average similarity between a block ofrun-time event messages generated by the event source and the eventmessages; and generating an alert indicating abnormal behavior of theevent source when the average similarity is greater than the normaldiscrepancy radius threshold.
 8. The computer system of claim 7 whereincomputing the normal discrepancy radius threshold comprises: computingan event-type distribution for each block of event messages generated bythe event source; determining a baseline event-type distribution of theevent-type distributions, the baseline event-type distribution havingthe largest entropy of the event-type distributions; and computing thenormal discrepancy radius threshold based on the event-typedistributions centered at the baseline event-type distribution.
 9. Thecomputer system of claim 8 further comprising forming each block ofevent messages by randomly selected event messages from an event log ofthe event source.
 10. The computer system of claim 8 wherein determiningthe baseline event-type distribution of the event-type distributionscomprises: computing an entropy for each event-type distribution;determining a maximum entropy of the entropies computed for eachevent-type distribution; and identifying the event-type distributionwith the maximum entropy as the baseline event-type distribution. 11.The computer system of claim 7 wherein computing the normal discrepancyradius threshold comprises: computing event-type distributions fromblocks of event messages previously generated by the event source;computing a similarity between each event-type distribution and otherevent-type distributions; computing an average similarity of eachevent-type distribution based on the similarities computed between theevent-type distribution and the event-type distributions; rank order theaverage similarities obtained for event-type distribution from maximumto minimum average similarities; calculating a normal discrepancy radiusas a difference between the maximum and minimum average similarities;and calculating a normal discrepancy radius threshold as a differencebetween the average similarity of the baseline event-type distributionand normal discrepancy radius.
 12. The computer system of claim 7wherein computing the average similarity comprises: computing event-typedistributions from blocks of event messages previously generated by theevent source; computing a run-time event-type distribution from a blockof the run-time event messages; computing a similarity between therun-time event-type distribution and each of the event-typedistributions; and computing an average similarity of run-timeevent-type distribution based on the similarities computed between therun-time event-type distribution and the event-type distributions.
 13. Anon-transitory computer-readable medium encoded with machine-readableinstructions that implement a method carried out by one or moreprocessors of a computer system to perform the operations comprising:computing a normal discrepancy radius threshold based on event messagesgenerated by an event source; computing an average similarity between ablock of run-time event messages generated by the event source and theevent messages; and generating an alert indicating abnormal behavior ofthe event source when the average similarity is greater than the normaldiscrepancy radius threshold.
 14. The medium of claim 1 whereincomputing the normal discrepancy radius threshold comprises: computingan event-type distribution for each block of event messages generated bythe event source; determining a baseline event-type distribution of theevent-type distributions, the baseline event-type distribution havingthe largest entropy of the event-type distributions; and computing thenormal discrepancy radius threshold based on the event-typedistributions centered at the baseline event-type distribution.
 15. Themedium of claim 14 further comprising forming each block of eventmessages by randomly selected event messages from an event log of theevent source.
 16. The medium of claim 14 wherein determining thebaseline event-type distribution of the event-type distributionscomprises: computing an entropy for each event-type distribution;determining a maximum entropy of the entropies computed for eachevent-type distribution; and identifying the event-type distributionwith the maximum entropy as the baseline event-type distribution. 17.The medium of claim 13 wherein computing the normal discrepancy radiusthreshold comprises: computing event-type distributions from blocks ofevent messages previously generated by the event source; computing asimilarity between each event-type distribution and other event-typedistributions; computing an average similarity of each event-typedistribution based on the similarities computed between the event-typedistribution and the event-type distributions; rank order the averagesimilarities obtained for event-type distribution from maximum tominimum average similarities; calculating a normal discrepancy radius asa difference between the maximum and minimum average similarities; andcalculating a normal discrepancy radius threshold as a differencebetween the average similarity of the baseline event-type distributionand normal discrepancy radius.
 18. The medium of claim 13 whereincomputing the average similarity comprises: computing event-typedistributions from blocks of event messages previously generated by theevent source; computing a run-time event-type distribution from a blockof the run-time event messages; computing a similarity between therun-time event-type distribution and each of the event-typedistributions; and computing an average similarity of run-timeevent-type distribution based on the similarities computed between therun-time event-type distribution and the event-type distributions.